<template>
  <div>
    父组件
    <br>
    输入值传递给子组件:
    <input type="text" v-model="name">
    <son-com :data='name' @childValues='value'> </son-com>
    {{childData}}
  </div>
</template>

<script>
import sonCom from './son1Com'

export default {
   name:'faCom',
   components:{
       sonCom
   },
   data(){
       return{
           name:'',
           childData:'',
       }
   },
   methods:{
       value(data){
        //  console.log(this.$data);
         this.$data.childData = data
        //  this.$data
       }
   }
   

    



}
</script>

<style>

</style>